package com.it.service.impl;

import com.it.VO.ArticleOV;
import com.it.dao.ArticleMapper;
import com.it.domain.Article;
import com.it.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticleServImpl implements ArticleService {

    @Autowired
    private ArticleMapper articleMapper;

    @Override
    public boolean AddArticle(Article article) {

        return articleMapper.AddArticle(article)>0;
    }

    @Override
    public List<Article> GetAll() {
        return articleMapper.GetAll();
    }

    @Override
    public Article SelectById(Integer id) {
        return articleMapper.SelectById(id);
    }

    @Override
    public List<Article> SelectByAuthorId(Integer authorId) {
        return articleMapper.SelectByAuthorId(authorId);
    }
}
